package ArticleCategoryService

import (
    "fmt"
    "server/app"
    "server/entity"
    "server/helper"
)

func FindList() []entity.ArticleCategory {
    list := make([]entity.ArticleCategory, 0)
    sqlStr := fmt.Sprintf("select Id,ParentId,Name,SortPath from ArticleCategory order by SortPath asc")
    helper.PrintLogSQL(sqlStr)
    err := app.GetDatabase().Select(&list, sqlStr)
    app.Panic(err)
    return list
}
